let MYSQL_CONF: {
  host: string
  port: string
  password: string
  database: string
  username: string
}
let REDIS_CONF: {
  host: string
  port: number
  password: string
}
switch (process.env.NODE_ENV) {
  case 'dev':
    MYSQL_CONF = {
      host: 'localhost',
      port: '3306',
      password: 'admin123',
      database: 'koa2_weibo',
      username: 'root'
    }
    REDIS_CONF = {
      host: 'localhost',
      port: 6379,
      password: 'admin123'
    }
    break
  case 'test':
    MYSQL_CONF = {
      host: 'localhost',
      port: '3306',
      password: 'admin123',
      database: 'koa2_weibo',
      username: 'root'
    }
    break
  case 'prod':
    MYSQL_CONF = {
      host: 'localhost',
      port: '3306',
      password: 'admin123',
      database: 'koa2_weibo',
      username: 'root'
    }
    break
  default:
    MYSQL_CONF = {
      host: 'localhost',
      port: '3306',
      password: 'admin123',
      database: 'koa2_weibo',
      username: 'root'
    }
    break
}

export { MYSQL_CONF, REDIS_CONF }
